# __init__.py
import os
import sys
from pathlib import Path

# 使用 pathlib
PROJECT_ROOT = Path(__file__).parent.parent.resolve()

# 使用传统方式，但更加健壮
PROJECT_ROOT_STR = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
if PROJECT_ROOT_STR not in sys.path:
    sys.path.insert(0, PROJECT_ROOT_STR)

from .base_engine import InferenceEngine
from .detector_postprocess import DetectorPostProcessor
from .inference_pipeline import InferencePipeline
from .onnx_engine import ONNXEngine
from .tensorrt_engine import TensorRTEngine

__all__ = [
    'InferenceEngine',
    'DetectorPostProcessor',
    'InferencePipeline',
    'ONNXEngine',
    'TensorRTEngine'
]